<?php
	use app\modules\cn\models\ExerciseTopic;
    use app\modules\cn\models\ExerciseLevel;
    use app\modules\cn\models\ExerciseType;
?>
<script type="text/javascript" src="/My97DatePicker/WdatePicker.js"></script>

<div class="span10" id="datacontent">
    <ul class="breadcrumb">
        <li><a href="/applets/index/index">百度小程序管理</a> <span class="divider">></span></li>
        <li class="active">用户管理</li>
    </ul>
   
    <h4>列表</h4>
    <form action="/applets/user/index" method="get" class="form-horizontal">
        <table class="table">
            <tr>
                <td>
                    手机号：
                    <input type="text" name="phone" class="phone" value="<?php echo $phone ?>">               
                </td>
            </tr>
            <tr>
                <td>
                    <button class="btn btn-primary" type="submit">提交</button>
                </td>
            </tr>
        </table>
    </form>
    <!-- <a href="/listen/info/add">新增咨询</a> -->
    <form action=" " id="checkPush" method="post">
        <table class="table table-hover">
            <thead>
            <tr>
                <th width="80">ID</th>
                <th>用户昵称</th>
                <th>用户uid</th>
                <th>用户电话</th>
                <th>加入时间</th>
                <th>是否联系</th>
            </tr>
            </thead>
            <tbody>
            	<?php
	            foreach($data as $v) {
	                ?>
	                <tr>
	                    <td><span><?php echo $v['id']?></span></td>
	                    <td><span><?php echo $v['username']?></span></td>
	                    <td><span><?php echo $v['uid']?></span></td>
                        <td><span><?php echo $v['phone']?></span></td>
                        <td><span><?php echo date('Y.m.d',$v['createTime'])?></span></td>
	                    <td><span>
	                    	<?php if($v['isContact'] == 1) {?>
                                <a class="btn btn-success" disabled="">是</a>
                            <?php } else {?>
                                <a class="btn btn-danger" href="/applets/user/handle-user?id=<?php echo $v['id']?>">否</a>
                            <?php }?>

	                    </span></td>
	                </tr>

	                <?php
	            }
	            ?>
            </tbody>
        </table>
        <div class="control-group">
            <div class="controls">
            </div>
        </div>
        <input type="hidden" name="url" value="<?php echo Yii::$app->request->getUrl()?>" />
    </form>
	<div class="pagination pagination-right">
        <?php use yii\widgets\LinkPager;?>
        <?php echo LinkPager::widget([
            'pagination' => $pageStr,
        ])?>
    </div>
</div>
<script>

</script>